#define _CRT_SECURE_NO_WARNINGS 1

class ParkingSystem {
public:
    ParkingSystem(int big, int medium, int small) {
        _big = big;
        _medium = medium;
        _small = small;
    }

    bool addCar(int carType) {
        if (carType == 3)
            return _small != 0 && _small--;
        else if (carType == 2)
            return _medium != 0 && _medium--;
        else
            return _big != 0 && _big--;

    }
    int _big;
    int _medium;
    int _small;
};